-- GENERATED SPELL FOR [Spell Shade] --


function spell0_16525(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(29925,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16525', 5000, 1)
end

function spell1_16525(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(29926,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16525', 6000, 1)
end

function spell2_16525(pUnit, Event) --@Phasing Invisibility,Self--
pUnit:FullCastSpellOnTarget(29920,pUnit)
pUnit:RegisterEvent('Sorts_16525', 0, 1)
end

function spell3_16525(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(29927,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16525', 2000, 1)
end

function Sorts_16525(pUnit, Event)
local choix_sorts_16525 = math.random(0, 3)
if choix_sorts_16525 == 0 then
pUnit:RegisterEvent('spell0_16525', 1, 1)
end
if choix_sorts_16525 == 1 then
pUnit:RegisterEvent('spell1_16525', 1, 1)
end
if choix_sorts_16525 == 2 then
pUnit:RegisterEvent('spell2_16525', 1, 1)
end
if choix_sorts_16525 == 3 then
pUnit:RegisterEvent('spell3_16525', 1, 1)
end
end

function mob16525_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16525', math.random(1500, 3000), 1)
end

function mob16525_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16525_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16525_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16525, 1, 'mob16525_Action')
RegisterUnitEvent(16525, 2, 'mob16525_Leave')
RegisterUnitEvent(16525, 3, 'mob16525_Kill')
RegisterUnitEvent(16525, 4, 'mob16525_Die')
